import service from '../../request'

export default function getPhoneCode (phone, type = 2) {
  if (type === 2) {
    return service.get(`/common/code/${phone}`)
  }
  if (type === 1) {
    return service.get(`/common/code/${phone}/1`)
  }
}
